<template>
  <div>
    <el-tabs v-model="activeName" class="demo-tabs">
      <el-tab-pane label="管理员列表" name="first">
        <administrator ref="administrator"></administrator>
      </el-tab-pane>
      <el-tab-pane label="添加管理员" name="second">
        <admin-add @changeAdminPage="changeAdminPage">
        </admin-add>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Administrator from '@/components/admin/Administrator.vue'

import AdminAdd from '@/components/admin/AdminAdd.vue'
const administrator: any = ref(null)
const activeName = ref('first')


const changeAdminPage = function () {
  activeName.value = 'first'
  administrator._value.getAdminData()
}
</script>

<style lang="scss" scoped>
.demo-tabs>.el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}
</style>